﻿using System;

namespace DaveSexton.Labs.Tests.Category1.Console
{
	public class WaitForKeyLab : BaseConsoleLab
	{
		protected override void Main()
		{
			while (true)
			{
				TraceLine("Press any key or press Enter to stop this lab.");

				ConsoleKeyInfo input = WaitForKey();

				if (input.Key == ConsoleKey.Enter)
				{
					break;
				}

				TraceLine();
				TraceLine("You entered: {0} ({1})", input.KeyChar, input.Key);
				TraceLine();
			}
		}
	}
}